package com.icss.dao;

import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import com.icss.entity.Review;
import com.icss.entity.ReviewBean;

public interface ReviewBeanDao {
	@Select("select review. * ,custom.c_name,menu.DishName from review,custom,menu where menu.DishId=review.DishId and review.c_id=custom.c_id and review.Reviewclassid<>4 and menu.DishId=#{DishId}")
	public List<ReviewBean> findByDishId(Integer DishId);
	@Select("select review. * ,custom.c_name,menu.DishName from review,custom,menu where menu.DishId=review.DishId and review.c_id=custom.c_id and review.Reviewclassid=4 and menu.DishId=#{DishId}")
	public List<ReviewBean> findByRCId(Integer DishId);
	@SelectProvider(type=ReviewBeanPriv.class,method="selectReview")
	public List<ReviewBean> findAll(Review review);
	@Select("select review. * ,reviewclass.Reviewclassname,menu.DishName from review,reviewclass,menu where menu.DishId=review.DishId and review.Reviewclassid=reviewclass.Reviewclassid and review.c_id=#{c_id};")
	public List<ReviewBean> findByCId(Integer c_id);
}
